
package dieci.system;

import dieci.database.PersistentObject;
import dieci.utils.Redondeo;

/**
 *
 * @author DuckSys
 */
public class OrderRawMaterialDetails implements PersistentObject{

    private long orderRawMaterialId;
    private long rawMaterialId;
    private int amount;
    private double cost;


    public OrderRawMaterialDetails()
    {
    }

    public OrderRawMaterialDetails(long rawMaterialId, int amount, double cost)
    {
        this.rawMaterialId = rawMaterialId;
        this.amount = amount;
        this.cost = Redondeo.Redondear(cost, 2);
    }

    public OrderRawMaterialDetails(long orderRawMaterialId, long rawMaterialId, int amount, double cost)
    {
        this(rawMaterialId,amount,cost);
        this.orderRawMaterialId = orderRawMaterialId;        
    }

        /**
     * Get the value of cost
     *
     * @return the value of cost
     */
    public double getCost()
    {
        return cost;
    }

    /**
     * Set the value of cost
     *
     * @param cost new value of cost
     */
    public void setCost(double cost)
    {
        this.cost = Redondeo.Redondear(cost, 2);
    }
    
    /**
     * Get the value of amount
     *
     * @return the value of amount
     */
    public int getAmount()
    {
        return amount;
    }

    /**
     * Set the value of amount
     *
     * @param amount new value of amount
     */
    public void setAmount(int amount)
    {
        this.amount = amount;
    }

    
    /**
     * Get the value of rawMaterialId
     *
     * @return the value of rawMaterialId
     */
    public long getRawMaterialId()
    {
        return rawMaterialId;
    }

    /**
     * Set the value of rawMaterialId
     *
     * @param rawMaterialId new value of rawMaterialId
     */
    public void setRawMaterialId(long rawMaterialId)
    {
        this.rawMaterialId = rawMaterialId;
    }

    
    /**
     * Get the value of orderRawMaterialId
     *
     * @return the value of orderRawMaterialId
     */
    public long getOrderRawMaterialId()
    {
        return orderRawMaterialId;
    }

    /**
     * Set the value of orderRawMaterialId
     *
     * @param orderRawMaterialId new value of orderRawMaterialId
     */
    public void setOrderRawMaterialId(long orderRawMaterialId)
    {
        this.orderRawMaterialId = orderRawMaterialId;
    }

}
